import { useQueryClient } from '@tanstack/react-query'
import { useCurdappAccountsQueryKey } from './use-curdapp-accounts-query-key'

export function useCurdappAccountsInvalidate() {
  const queryClient = useQueryClient()
  const queryKey = useCurdappAccountsQueryKey()

  return () => queryClient.invalidateQueries({ queryKey })
}
